
----------------------------------------
For launching/debugging the Aspose.Words for Java web demo locally under IntelliJ and Apache Tomcat:


1. This demo uses Tomcat ver. 6.0, you can download it from:
http://tomcat.apache.org/download-60.cgi

2. When installing, don't okay default directory (C:\Program files...), install it in a folder
with no spaces in the name. For example, "C:\X\Java\Tomcat.6.0\" Note: no spaces in the path.

3. Register Tomcat in IntelliJ: Settings|IDE|Application servers|Add|Tomcat Server (home and base 
directory: "C:\X\Java\Tomcat.6.0\"). 

4. Add servlet-api.jar lib to IntelliJ paths: Settings|Project|Modules|Libraries|Module Libraries:
   |Add Jar/Directory... Locate "X:\Java\Tomcat5.0\common\lib\servlet-api.jar".

5. Compile and launch/debug web demo by pressing Run or Debug button on IntelliJ toolbar (or menu Run|Run, Run|Debug).
   You might need to create a run/debug confirmation in IntelliJ before that.


----------------------------------------
For deploying under Tomcat IntelliJ-compiled WAR file:


1. Add servlet-api.jar lib to IntelliJ paths: Settings|Project|Modules|Libraries|Module Libraries:
   |Add Jar/Directory... Locate <Tomcat Home>\common\lib\servlet-api.jar.

2. Compile war file in IntelliJ: don't press Run/Debug, press menu Build|Rebuild Project instead.
A compiled <project_name>.war file will appear in the project root folder.

3. Start Tomcat; in Tomcat Welcome screen choose Administration|Tomcat Manager (or load in browser 
http://127.0.0.1:8080/manager/html).

4. Deploy WAR file - in the Applications, select <project_name> - click it and you will see ours 
web app welcome page.

----------------------------------------
For deploying without IntelliJ.

1. For creating the WAR file manually you have to do:

1.	Make a dir with an arbitrary name (for instance ‘dir’).
2.	Copy index.html from demos\Aspose.Words.Demos.Web\resources to root of the dir.
3.	Copy Database and Documents folders from demos\ to dir\.
4.	Copy META-INF folder from demos\Aspose.Words.Demos.Web\ to dir\.
5.	Copy WEB-INF folder from demos\Aspose.Words.Demos.Web\ to dir\.
6.	Copy libraries: Aspose.Words.jdk15.jar, jaxen.jar, itext-1.4.2.jar and both StAX jars (jsr173_1.0_api.jar
    and sjsxp.jar) from lib\ folder to dir\ WEB-INF\lib\.
7.	Compile (under jdk1.5) demo classes. Servlet class: demos\Aspose.Words.Demos.Web\src\DemoServlet.java.
    Demo classes: all files inside demos\Aspose.Words.Demos\src.
8.	Copy all  compiled files to dir\WEB-INF\classes\com\aspose\words\demos\.
9.	Add all content of dir\ (exclude ‘dir’ itself) to one ZIP archive.
10.	Rename this archive to Aspose.Words.Demos.Web.war.

2.Okay, we have the WAR. Now we can deploy it:

1.	Start Tomcat.
2.	In Tomcat Welcome screen choose Administration|Tomcat Manager (or load in browser http://127.0.0.1:8080/manager/html).
3.	Deploy the WAR file.
4.	In the Applications, select Aspose.Words.Demos.Web - click it and you will see ours web app welcome page.

